$(function(){
    $.getUrlParam = function (name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
      console.log(reg)
      var r = window.location.search.substr(1).match(reg);
      console.log(r)
      if (r != null) return unescape(r[2]); return null;
     }
  })
